Skip to content

[Edward Alvin] ip#305

Open
ThePrevailingOne wants to merge 43 commits into
nus-cs2103-AY2122S2:masterfrom
ThePrevailingOne:master
Open

[Edward Alvin] ip#305
ThePrevailingOne wants to merge 43 commits into
nus-cs2103-AY2122S2:masterfrom
ThePrevailingOne:master

Conversation

@ThePrevailingOne
Copy link
Copy Markdown

No description provided.

Comment thread src/main/java/Duke.java Outdated
return Duke.LIST.equals(word);
public static void processInput(InputType inputType, String value) {
switch(inputType) {
case LIST:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the codestyle, there should be no intentation for 'case' clauses in the switch block.

Comment thread src/main/java/Duke.java Outdated
public static boolean isList(String word) {
return Duke.LIST.equals(word);
public static void processInput(InputType inputType, String value) {
switch(inputType) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor style-related thing, but there should be a space before the bracket i.e switch (inputType)

Comment thread src/main/java/Duke.java Outdated
Object[] parseResult = InputParser.parseInput(input);
InputType inputType = (InputType) parseResult[0];
String value = (String) parseResult[1];
String[] value = (String[]) parseResult[1];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the cast to String[] array here, instead of making InputParser::parseInput(input) return a String[] instead of Object[]?

Comment thread src/main/java/InputParser.java Outdated
value = "";
if (inputType.label.length() < input.length()) {
value = input.substring(inputType.label.length() + 1);
if (inputType == InputType.BYE || inputType == InputType.LIST) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be neater to separate out into boolean variables for example isBye, isList, etc to be in line with the code quality guideline

Copy link
Copy Markdown

@muraddurrani muraddurrani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally I found it quite easy to read all the code. I think you just need to adjust some small things like renaming arrays and arraylists to be plural form.

Comment thread src/main/java/Duke.java Outdated
Comment on lines +23 to +25
Object[] parseResult = InputParser.parseInput(input);
InputType inputType = (InputType) parseResult[0];
String[] value = (String[]) parseResult[1];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think parseResult and value could both be renamed in plural form (results and values perhaps?) to be consistent with naming conventions. I noticed this in a few other places.

Comment thread src/main/java/Duke.java Outdated
}
}

public static void processInput(InputType inputType, String[] value) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small thing because its just a parameter but maybe change value to values so its plural?

Comment thread src/main/java/Todo.java Outdated
@@ -0,0 +1,12 @@
public class Todo extends WordListItem{
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should be a space between WordListItem and {.

@@ -0,0 +1,5 @@
public class UnknownInputException extends Exception{
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should be a space between Exception and {.

Comment thread src/main/java/WordList.java Outdated
import java.util.ArrayList;

public class WordList {
private ArrayList<WordListItem> wordList;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this could be renamed to words or something similar to be plural?

Comment thread src/main/java/WordList.java Outdated
System.out.println(this);
}

public int length() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coding standards suggest that method names be verbs. Perhaps this could be changed to getLength or something like that.

@ThePrevailingOne
Copy link
Copy Markdown
Author

Duked

“Your mind is for having ideas, not holding them.” – David Allen

Duked frees your mind of having to remember things you need to do. It's,

  • text-based
  • easy to learn
  • FAST SUPER FAST to use

All you need to do is,

  1. download it from here.
  2. double-click it.
  3. add your tasks.
  4. let it manage your tasks for you 😉

And it is FREE!

Features:

  • Managing tasks
  • Managing deadlines (coming soon)
  • Sorting tasks (coming soon)

Just double click on the jar and it should open the app GUI :)

or

Run

java -jar Duke.jar //depending on the relative location of the app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants